package Test;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Date;

public class TileMapWriter {

	private FileWriter writer;
	private BufferedWriter bWriter;
	
	public static void main(String[] args){
		TileMapWriter w = new TileMapWriter();
		
	for (int i = 0; i < args.length; i++) {
		
	}

		System.out.print(w.createGetPropertyMethod("boolean", "Strong"));
		System.out.print(w.createGetPropertyMethod("int", "Health"));
		System.out.print(w.createGetPropertyMethod("String", "Name"));
	}
	
	public String createGetPropertyMethod(String type, String name){
		String getMethod = "public "+type + " get"+name + "(){ \n"+
		"return "+ name +"\n"+
		"}";

		return getMethod;
	}
	
	private void parseProductLine(String line){
		
		String[] tokens = line.split(";");

		if (tokens.length == 7) {

		} else {
			System.out.println("iMatDataHandler products file, invalid line: " + line);
		}
	}

	private void openTileMap(File f){
		
		try
		{
			BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(f), "ISO-8859-1"));


			String line;
			if ((line = reader.readLine()) != null) {

			}
			
			while ((line = reader.readLine()) != null)
			{
				String[] tokens = line.split(";");
				if (tokens.length == 2) {


				}
			}


			reader.close();
		} catch (IOException exc) {
			exc.printStackTrace();
		}
	}


	private void verifyDirectories(){
		
		File directory;
		try
		{
			directory = new File(getProjectDirectory());
			if (!directory.exists())
				directory.mkdir();
		}
		catch (Exception ex)
		{
			System.out.println("Createng projectFolder " + ex);
		}

	}

	private String getProjectDirectory(){
		
		return System.getProperty("home") + File.separatorChar + "Folder";
	}
}
